package com.lanou.pianke.admin.service.impl;

import com.lanou.pianke.admin.entity.User;
import com.lanou.pianke.admin.mapper.UserMapper;
import com.lanou.pianke.admin.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public List<User> showAll() {
        return userMapper.selectAll();
    }

    @Override
    public void delete() {
        userMapper.updateStatusReported();
    }

    @Override
    public List<User> showReported() {
        return userMapper.selectReported();
    }

    @Override
    public void deleteUserByUid(Long uid) {
        userMapper.updateStatusByUid(uid);
    }


}
